refactor: migrate multichain account components to DS#30249
Conversation
| closeButtonOptions: { | ||
| variant: ButtonIconVariant.Icon, | ||
| iconName: ToastIconName.Close, | ||
| variant: 'Icon', |
There was a problem hiding this comment.
I see some ButtonIconVariant in the DS package, but none of them matches 'Icon', should we use ButtonIconVariant.Default instead?
There was a problem hiding this comment.
I don't think so because the interface expects the value Icon and ButtonIconVariant.Default is set to default. @MetaMask/design-system can you double check this?
@ccharly lets wait for the team to chime in and lets not block the PR
There was a problem hiding this comment.
(I'll keep this unresolved for visibility)
| (typeof AvatarAccountType)[keyof typeof AvatarAccountType]; | ||
|
|
||
| export const getAvatarAccountVariant = ( | ||
| avatarAccountType: AccountAvatarVariant, |
There was a problem hiding this comment.
Should this also use LegacyAvatarAccountType?
| avatarAccountType: AccountAvatarVariant, | |
| avatarAccountType: AccountAvatarVariant | LegacyAvatarAccountType, |
There was a problem hiding this comment.
AccountAvatarVariant already takes into account the legacy type:
export type AccountAvatarVariant =
| AvatarAccountVariant
| LegacyAvatarAccountType;…to gar/refactor/mul-1693
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Impact assessment:
Tags selected:
The testID change in Performance Test Selection: |
|
| const toastOptions: CopyToastOptions = { | ||
| variant: 'Plain', | ||
| labelOptions: [{ label: copyParams.toastMessage }], | ||
| labelOptions: [{ label: copyParams.toastMessage ?? '' }], |
There was a problem hiding this comment.
Nit: Not sure we really need the fallback part here since we check for && copyParams.toastMessage above 🤔
| closeButtonOptions: { | ||
| variant: ButtonIconVariant.Icon, | ||
| iconName: ToastIconName.Close, | ||
| variant: 'Icon', |
There was a problem hiding this comment.
(I'll keep this unresolved for visibility)



Description
Migrates the MultichainAccounts temporary component internals away from deprecated component-library imports and onto
@metamask/design-system-react-nativeequivalents.This updates account rows, external account rows, account selector list pieces, address rows, checkboxes, search fields, text, icons, sensitive text, and avatar usage. It also adds a small avatar variant compatibility helper so legacy persisted selector values such as
Maskicon,JazzIcon, andBlockiescontinue to map to the DSAvatarAccountVariantAPI.Changelog
CHANGELOG entry: null
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/MUL-1693
Manual testing steps
Screenshots/Recordings
Screen.Recording.2026-05-15.at.4.13.43.PM.mov
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Medium Risk
Medium risk because it replaces core account-selector UI primitives (avatars, text, search, checkbox, toast wiring) with Design System components, which could cause subtle rendering/interaction regressions across account selection flows.
Overview
Migrates the temporary MultichainAccounts UI components (
AccountCell, selector list cells/headers, external account rows, address rows, and address rows list) from deprecated component-library primitives to@metamask/design-system-react-nativeequivalents (text, icons, sensitive text, avatars, search, checkbox).Introduces
avatarAccountVariantcompatibility helpers to map legacy persisted avatar type strings (Maskicon/JazzIcon/Blockies) to DSAvatarAccountVariant, and updates tests to assert DS components/testIDs (including new checkbox icon and network avatar test IDs) and to use timer-safeact/fake-timer handling for copy/toast feedback.Reviewed by Cursor Bugbot for commit 9a035d1. Bugbot is set up for automated code reviews on this repo. Configure here.